<template>
  <div id="picLunboChange">
    <el-collapse v-model="open">
      <el-collapse-item title="内容样式" name="1">
        <submitPic></submitPic>
      </el-collapse-item>
    </el-collapse>
    <el-collapse v-model="open2">
      <el-collapse-item title="内容样式" name="2">
        <li>
            <span>上间距：</span>
            <div>
              <edgeSetting v-model="styles.marginTop" unit="px" :max="50" :init="Number(styles.marginTop)"></edgeSetting>
            </div>
          </li>
          <li>
            <span>下间距：</span>
            <div>
              <edgeSetting v-model="styles.marginBottom" unit="px" :max="50" :init="Number(styles.marginBottom)"></edgeSetting>
            </div>
          </li>
          <li>
            <span>左右间距：</span>
            <div>
              <edgeSetting v-model="styles.marginLR" unit="px" :max="50" :init="Number(styles.marginLR)"></edgeSetting>
            </div>
          </li>
          <li>
            <span>圆角：</span>
            <div>
              <edgeSetting v-model="styles.circle" unit="px" :max="50" :init="Number(styles.circle)"></edgeSetting>
            </div>
          </li>
          <li>
            <span>高度：</span>
            <div>
              <edgeSetting v-model="styles.height" unit="px" :min="1" :max="500" :init="Number(styles.height)"></edgeSetting>
            </div>
          </li>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
import edgeSetting from "../../comm/edgeSetting";
import submitPic from '../../comm/submitPic'
import { mapState, mapMutations } from "vuex";
export default {
  name: "picLunboChange",
  data() {
    return {
      open: "1",
      open2: "2",
    };
  },
  components: {
    edgeSetting,
    submitPic
  },
  computed: {
    ...mapState(["list", "currentId"]),
    styles() {
      return this.list[this.currentId].styles;
    },
  },
};
</script>

<style lang="less" scoped>
@import url('../../../assets/css/base.less');
</style>
